package com.crm.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Entity
@Table(name = "goods")
@ApiModel("商品")
public class Goods {

    @Id
    @GenericGenerator(name = "system-uuid", strategy = "uuid2")
    @GeneratedValue(generator = "system-uuid")
    @ApiModelProperty(value = "商品id", required = true, hidden = true)
    private String id;

    @ApiModelProperty(value = "商品标题", required = true)
    private String title;

    @ApiModelProperty(value = "商品摘要", required = true)
    private String tabloid;
    
    @ApiModelProperty(value="商品描述内容",required=true)
	private String content;

    @ApiModelProperty(value = "商品添加时间", hidden = true)
    private Date addTime;

    @ApiModelProperty(value = "商品图片链接", required = true)
    private String imgUrl;

    @ApiModelProperty(value = "商品当前售价", required = true)
    private Double sellPrice;

    @ApiModelProperty(value = "商品市场售价", required = true)
    private Double marketPrice;

    @ApiModelProperty(value = "商品库存", required = true)
    private Integer stockQuantity;

    @ApiModelProperty(value = "商品上架", required = true)
    private boolean pullOn;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTabloid() {
        return tabloid;
    }

    public void setTabloid(String tabloid) {
        this.tabloid = tabloid;
    }

    public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public Double getSellPrice() {
        return sellPrice;
    }

    public void setSellPrice(Double sellPrice) {
        this.sellPrice = sellPrice;
    }

    public Double getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(Double marketPrice) {
        this.marketPrice = marketPrice;
    }

    public Integer getStockQuantity() {
        return stockQuantity;
    }

    public void setStockQuantity(Integer stockQuantity) {
        this.stockQuantity = stockQuantity;
    }

    public boolean isPullOn() {
        return pullOn;
    }

    public void setPullOn(boolean pullOn) {
        this.pullOn = pullOn;
    }

	@Override
	public String toString() {
		return "Goods [id=" + id + ", title=" + title + ", tabloid=" + tabloid + ", content=" + content + ", addTime="
				+ addTime + ", imgUrl=" + imgUrl + ", sellPrice=" + sellPrice + ", marketPrice=" + marketPrice
				+ ", stockQuantity=" + stockQuantity + ", pullOn=" + pullOn + "]";
	}
}
